<%@page import="com.mmy.domain.sys.TSysUser"%>
<%@page import="com.mmy.domain.constzone.TConstZone"%>
<%@page import="com.mmy.domain.line.TLineBase"%>
<%@page import="com.mmy.domain.line.TLineTrip"%>
<%@page import="com.mmy.domain.line.VLineBase"%>
<%@page import="com.mmy.domain.sys.TSysOrg"%>
<%@page import="com.mmy.domain.line.TLinePlace"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	TSysUser tSysUser = (TSysUser) session.getAttribute("tSysUser");
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<jsp:include page="/WEB-INF/jsp/includeb.jsp"></jsp:include>
<script src="js/layer/layer.js"></script>
</head>
<body>
<script>
$(function () {
laydate.render({
  elem: '#orderDay',
  theme: '#1eab3c',
	});
});
	
function clearInput(){
	$("#lineName").val("");
	$("#orderName").val("");
	$("#orderDay").val("");
	$("#orderTel").val("");
	$("#orderType").val("0");
}
</script>
	<div id="off-canvas-container" class="off-canvas-container">
		<jsp:include page="/WEB-INF/jsp/BackHeader.jsp"></jsp:include>
		<main class="at-padding-large-bottom"> <article> <header
			class="bg-light at-padding-large-top at-padding-large-bottom at-margin-large-bottom">
		<div class="page-header container">
			<div class="row">
				<div class="span-5 col">
					<h3>线路管理</h3>
				</div>
			</div>
		</div>
		</header> 
		<section class="container">
		<nav class="breadcrumb">
		<a href="orderreserved?type=${type}">预留单</a> / <a href="orderpaid?type=${type}">订单</a> / <b><a href="ordercancel?type=${type}">退单</a></b>
		<hr class="breadcrumb-hr" color=#F9F6E5 SIZE=3></hr>
		</nav>
		<div class="information">
			<!-- 开始 -->
				<form action="ordercancel" class="info-form" >
					<input type="hidden" id="type" value="${type}">
						<h4 class="info-h4">
							<i class="fa fa-caret-right" aria-hidden="true" ></i>线路退单管理
						</h4>
				<span> <label for="orderType">订单类型：</label></span>
				<select class="input-select-vlign" id="orderType" name="orderType">
							<option value="0" <c:if test="${orderType == 0}"> selected="selected"</c:if> >全部</option>
							<option value="1" <c:if test="${orderType == 1}"> selected="selected"</c:if> >本公</option>
							<option value="2" <c:if test="${orderType == 2}"> selected="selected"</c:if> >采购</option>
							<option value="3" <c:if test="${orderType == 3}"> selected="selected"</c:if> >外采</option>
				</select>
				线路名称：<input type="text" class="input-width" id="lineName" name="lineName" value="${lineName}"/>
				姓名： <input type="text" class="input-width" id="orderName" name="orderName" value="${name}"/> 
				电话： <input type="text" class="input-width-tel" id="orderTel" name="orderTel" value="${tel}"/>
				收款日期：<input type="text" class="input-width-date" id="orderDay" name="orderDay" value="${date}" />
				<input type="submit" value="搜索" class="btn"/>
				<input type="button" value="重置"  class="btn" onclick = "clearInput()" /><br>
				<!-- <input type="button" value="删除" class="btn at-float-right" onclick="delOrderLine()">  -->
				<input type="button" value="取消退单" class="btn at-float-right" onclick="lineCancelRefundUnion()"> 
				<input type="button" value="回复申请" class="btn at-float-right" onclick="replyOrderCancel()"> 
				<input type="button" value="打印凭证" class="btn at-float-right" onclick="printCancelLineUnion()"> 
				<input type="button" value="退款" class="btn at-float-right" onclick="RefundUnion()">
				<table class="info-table">
					<tr>
						<th>
							<input type="checkbox" id="ckall" name="ckall" onclick="ckAll(this);">
						</th>
						<th>姓名</th>
						<th>手机</th>
						<th>备注</th>
						<th>收款人</th>
						<th>收款日期</th>
						<th>线路名</th>
						<th>线路所属公司</th>
						<th>退款状态</th>
					</tr>
					<c:forEach var="lstLineOrder" items="${lstLineOrder}">
					<tr>
						<td>
							<input type="checkbox" name="ckone" value="${lstLineOrder.getID()}" onclick="ckOne(this)">
						</td>
						<td>
						<input type="hidden" name="LineID" value="${lstLineOrder.getLineID()}"/>
						
						${lstLineOrder.getOrderName()}</td>
						<td>${lstLineOrder.getOrderTel()}</td>
						<td>${lstLineOrder.getMemo()}</td>
						<td><input type="hidden"  name="orderUserOrgID" value="${lstLineOrder.getOrderUserOrgID()}"/>
							${lstLineOrder.getOrderUserName()}</td>
						<td><fmt:formatDate value='${lstLineOrder.getOrderDate()}' pattern='yyyy年MM月dd日'/></td>
						<td>${lstLineOrder.getLineName()}</td>
						<td>${lstLineOrder.getLineOrgName()}</td>
						<td>
						 <input type="hidden" name="refundProcess" value="${lstLineOrder.getRefundProcess()}" />
						 <input type="hidden" name="orderState" value="${lstLineOrder.getOrderState()}" />
				        <c:if test="${lstLineOrder.getRefundProcess()==1}">
				         <label>申请中</label>
				     	</c:if>  
				     	 <c:if test="${lstLineOrder.getRefundProcess()==2}">
				     	 		 <c:if test="${lstLineOrder.getOrderState()==1}">
				         			<label>已允许退单</label>
				     			</c:if>  
				     			 <c:if test="${lstLineOrder.getOrderState()==2}">
				        			 <label>已允许退单</label>
				     			</c:if> 
				     			 <c:if test="${lstLineOrder.getOrderState()==4}">
				        			 <label>退款完成</label>
				     			</c:if>  
				     	</c:if>
				     	<c:if test="${lstLineOrder.getRefundProcess()==3}">
				     	 <label>不允许退单</label>
				     	</c:if>
						</td>
					</tr>
				</c:forEach>
				</table>
				<select class="input-select-vlign" name="pageSize"
						onchange="OrderCancelPageSize(this.options[this.options.selectedIndex].value)">
						<option style="display: none;">${iPageSize}</option>
						<option value="10">10</option>
						<option value="5">5</option>
						<option value="2">2</option>
					</select> <a
						href="ordercancel?pageNumber=1&pageSize=${iPageSize}">首页</a>
					<c:choose>
						<c:when test="${iPageNo == 1}">
						</c:when>
						<c:otherwise>
							<a href="ordercancel?pageNumber=${iPageNo-1}&pageSize=${iPageSize}">上一页</a>
						</c:otherwise>
					</c:choose>
					<c:choose>
						<c:when test="${iPageNo == iMaxPage}">
						</c:when>
						<c:otherwise>
							<a href="ordercancel?pageNumber=${iPageNo+1}&pageSize=${iPageSize}">下一页</a>
						</c:otherwise>
					</c:choose>
					<a href="ordercancel?pageNumber=${iMaxPage}&pageSize=${iPageSize}">尾页</a>
				
				</form>
			<!--  停  -->
			<center>
				<input type="button" class="btn" value="返回" onclick="rehidder()" />
			</center>
		</div>
		</section> </article> </main>
		<jsp:include page="/WEB-INF/jsp/Footer.jsp"></jsp:include>
	</div>
	<jsp:include page="/WEB-INF/jsp/include2.jsp"></jsp:include>
</body>
</html>